﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MvvmHelper;
using System.Windows;
using System.ComponentModel;
using System.Windows.Input;

namespace MVVMKKSample.VM
{
    public class vm返品入力 : vm返品Header,INotifyPropertyChanged
    {
        public vm返品入力()
        {
            this.店舗名称 = "京急百貨店";
            this.売場名称 = "婦人ナイトウェア";
            this.取引先名称 = "取引先１２３４５６";
            this.税区分名称 = "外税";
            this.承認者名称 = "山田一郎";
            this.返品理由 = "不良品";
            this.内線番号 = "5394";
            this.UserID = "SFI太郎";
            this.UserName = "SFI太郎";
            this.lst店舗コード.Add(0);
            this.lst店舗コード.Add(1);
            this.lst店舗コード.Add(2);
            this.lst店舗コード.Add(3);
        }
        new public event PropertyChangedEventHandler PropertyChanged; //プロパティチェンジ用ハンドル

        #region 数量合計

        public int 数量合計
        {
            get { return _数量合計; }
            set
            {
                _数量合計 = value;
                PropertyChanged.Raise(this, 数量合計Name);
            }
        }

        private int _数量合計;
        internal static readonly string 数量合計Name = PropertyName<vm返品入力>.Get(_ => _.数量合計);

        #endregion
        #region 原価金額合計

        public Decimal 原価金額合計
        {
            get { return _原価金額合計; }
            set
            {
                _原価金額合計 = value;
                PropertyChanged.Raise(this, 原価金額合計Name);
            }
        }

        private Decimal _原価金額合計;
        internal static readonly string 原価金額合計Name = PropertyName<vm返品入力>.Get(_ => _.原価金額合計);

        #endregion
        #region 売価金額合計

        public decimal 売価金額合計
        {
            get { return _売価金額合計; }
            set
            {
                _売価金額合計 = value;
                PropertyChanged.Raise(this, 売価金額合計Name);
            }
        }

        private decimal _売価金額合計;
        internal static readonly string 売価金額合計Name = PropertyName<vm返品入力>.Get(_ => _.売価金額合計);

        #endregion
        #region 入力件数

        public int 入力件数
        {
            get { return _入力件数; }
            set
            {
                _入力件数 = value;
                PropertyChanged.Raise(this, 入力件数Name);
            }
        }

        private int _入力件数;
        internal static readonly string 入力件数Name = PropertyName<vm返品入力>.Get(_ => _.入力件数);

        #endregion
        #region エラー件数

        public int エラー件数
        {
            get { return _エラー件数; }
            set
            {
                _エラー件数 = value;
                PropertyChanged.Raise(this, エラー件数Name);
            }
        }

        private int _エラー件数;
        internal static readonly string エラー件数Name = PropertyName<vm返品入力>.Get(_ => _.エラー件数);

        #endregion
        #region 取消件数

        public int 取消件数
        {
            get { return _取消件数; }
            set
            {
                _取消件数 = value;
                PropertyChanged.Raise(this, 取消件数Name);
            }
        }

        private int _取消件数;
        internal static readonly string 取消件数Name = PropertyName<vm返品入力>.Get(_ => _.取消件数);

        #endregion
        #region flg確定

        public bool flg確定
        {
            get { return _flg確定; }
            set
            {
                _flg確定 = value;
                PropertyChanged.Raise(this, flg確定Name);
            }
        }

        private bool _flg確定;
        internal static readonly string flg確定Name = PropertyName<vm返品入力>.Get(_ => _.flg確定);

        #endregion

        #region 確定Command

        private void 確定CommandHandler(object parameter)
        {
            throw new NotImplementedException();
        }

        public ICommand 確定Command
        {
            get
            {
                if (_確定Command == null)
                    _確定Command = new DelegateCommand { CommandHandler = this.確定CommandHandler };
                return _確定Command;
            }
        }
        private ICommand _確定Command;

        #endregion
        #region 確認Command

        private void 確認CommandHandler(object parameter)
        {
            flg確定 = true;
        }

        public ICommand 確認Command
        {
            get
            {
                if (_確認Command == null)
                    _確認Command = new DelegateCommand { CommandHandler = this.確認CommandHandler };
                return _確認Command;
            }
        }
        private ICommand _確認Command;

        #endregion
        #region 入力クリアCommand

        private void 入力クリアCommandHandler(object parameter)
        {
            throw new NotImplementedException();
        }

        public ICommand 入力クリアCommand
        {
            get
            {
                if (_入力クリアCommand == null)
                    _入力クリアCommand = new DelegateCommand { CommandHandler = this.入力クリアCommandHandler };
                return _入力クリアCommand;
            }
        }
        private ICommand _入力クリアCommand;

        #endregion
        #region 戻るCommand

        private void 戻るCommandHandler(object parameter)
        {
            throw new NotImplementedException();
        }

        public ICommand 戻るCommand
        {
            get
            {
                if (_戻るCommand == null)
                    _戻るCommand = new DelegateCommand { CommandHandler = this.戻るCommandHandler };
                return _戻るCommand;
            }
        }
        private ICommand _戻るCommand;

        #endregion

    }
}
